package dmp

import (
	"gorm.io/driver/sqlite"
	"gorm.io/gorm"
)

func GetDB() *gorm.DB {
	var db, err = gorm.Open(sqlite.Open("dmp.db"), &gorm.Config{})
	if err != nil {
		panic("数据库初始化失败")
	}
	db.AutoMigrate(&User{})
	return db
}
